pkgname=pmbench
pkgver=git
pkgrel=1
pkgdesc="Micro benchmark for system pager performance "
arch=('i386' 'x86_64' 'aarch64')
url=https://bitbucket.org/jisooy/pmbench
license=(GPL)
depends=()
source=('https://bitbucket.org/hying-caritas/pmbench.git')
md5sums=('SKIP')

build()
{
  cd "${srcdir}"/pmbench
  if [[ $CARCH == 'x86_64' ]]; then
    march=64 make pmbench
  else
    march=32 make pmbench
  fi
}

package()
{ 
  install -D ${srcdir}/$pkgname/pmbench $pkgdir/usr/local/bin/pmbench
  install -m664 -D ${srcdir}/$pkgname/doc/pmbench.1 ${pkgdir}/usr/local/share/man/man1/pmbench.1
}
